﻿using MySystemSetup.IRole.Dto;
using MySystemSetup.IRolePremission.Dto;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using TodoApp.Dto;
using Volo.Abp.Application.Services;
using Volo.Abp.Uow;

namespace MySystemSetup.IRolePremission
{
    public interface IUserRolePremissionAppService: IApplicationService
    {


        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="uId">用户编号</param>
        /// <returns>菜单列表</returns>
        List<UserRolePremissionDto> GetMenuList(string uId);



        /// <summary>
        /// 分页权限角色
        /// </summary>
        /// <param name="page">当前页</param>
        /// <param name="limit">页容量</param>
        /// <param name="rName">权限编号</param>
        /// <returns>统一返回格式</returns>

        Task<SzrApiPageResult<PerMissionRoleShowDto>> GetPerMissionRolePage(int page, int limit, string? number);

        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="uId">用户编号</param>
        /// <returns>菜单列表</returns>
        List<TreeDto> GetMenuListTree();

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="rId">角色编号</param>
        /// <returns>同意返回格式</returns>

        Task<SzrApiResult<RoleShowDto>> DeletePerMissAsync(string pId, int rId, string uId);


        /// <summary>
        ///  更新角色权限
        /// </summary>
        /// <param name="list">要修改的集合</param>
        /// <returns>统一返回格式</returns>
        [UnitOfWork]
        Task<SzrApiResult<UpdRolePerDto>> UpdRolePerAsync(List<UpdRolePerDto> list);

    }
}
